#ifndef CELL_H
#define CELL_H

//#include "path.h"
#include "robot.h"
#include <string>
#include <list>

//class Path;
class Robot;
class Cell
{
public:
    Cell();
    Cell(int x, int y);
    Cell(Cell* cell);
    Cell(int x, int y, std::list<Robot*> robots, Robot* grantedFor);

    int x,y;
    Cell* getCell(){return this;}
    std::list<Robot*> getRobots(){return robotList;}
    Robot* getGrantedRobot(){return grantedFor;}
    bool isGranted(){return grantedFor!=NULL;}
    void addToRobotPath(Robot* robot);
    void removeGrant();
    bool isOnPath() {return robotList.size()>0;}
    bool isOnPathOf(Robot* robot);
    //bool isPrivate(){return robotList.size()==1;}
    bool isPrivate();
    void setGrantedRobot(Robot* robot){grantedFor=robot;}
    void printCell();
    int removeRobot(Robot* robot);
    int removeFromRobotPath(Robot* robot);
void printRobots();

private:
    Robot* grantedFor;
    std::list<Robot*> robotList;
};

#endif // CELL_H
